
version 8.0 
log using pres_runoff_extra.log, replace
 #delimit ;

*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:      pres_runoff_extra.do                            *;
*       Date:           5/18/05                                         *;
*       Author:         MRG                                             *;
*       Purpose:        Do-file to replicate results for AJPS version   *;
*                       of presidential candidates paper where          *;
*                       dependent variable is presidential candidates   *;
*                       for additional cross-sections.                  *;
*       Input File:     pcross_extra.dta                                *;
*       Output File:    pres_runoff_extra.log                           *;
*       Data Output:    None                                            *;
*       Previous file:                                                  *;
*       Machine:        Home                                            *;
*     ****************************************************************  *;
*     ****************************************************************  *;

set mem 10m;
set matsize 150;

use c:\ajps\pcross_extra.dta;

*     ****************************************************************  *;
*                           Summary Statistics                          *;
*     ****************************************************************  *;

sum;

*     ****************************************************************  *;
*                    Relabel and Define Variables                       *;
*     ****************************************************************  *;

label var country  "countryname";
label var newdem "first election as new democracy";
label var countrynumber "countrynumber";
label var year "year";
label var regime "regime as of 31 December of given year 0=democracy 1=dictatorship";
label var legelec "legislative election";
label var preselec "presidential election";
label var eighties "election in 1980s closest to 1985";
label var old "elections in countries that did not transition to democracy in 1990s";
label var nineties "elections in 1990s closest to 1995";
label var proximity1 "proximity - continuous";
label var proximity2 "proximity - dichotomous";
label var enpp "parliamentary parties - uncorrected";
label var enpp1 "parliamentary parties - corrected";
label var enep "electoral parties - uncorrected";
label var enep1 "electoral parties - corrected";
label var enpres "effective number of presidential candidates";
label var uppertier "percentage of uppertier seats";
label var eneg "effective number of ethnic groups  fearon";

describe;

*     ****************************************************************  *;
*       Would like to drop certain countries that do not fit.           *;
*       1. Drop Kiribati - not free entry of candidates                 *;
*       2. Drop elections that ultimately use an electoral college      *;
*       to determine who wins.  This means dropping Argentina 1946,     *;
*       1958, 1963, 1983, 1989, United States (all presidential         *;
*       elections), Finland 1950, 1956, 1962, 1968, 1978, 1982.         *;
*       3. Drop Ireland (all presidential elections) and Sri Lanka      *;
*       1994, 1999 since they use STV.                                  *;
*     ****************************************************************  *;

drop if countrynumber==163;
drop if countrynumber==65;
drop if countrynumber==113;
drop if countrynumber==96;
drop if countrynumber==66 & year==1946;
drop if countrynumber==66 & year==1958;
drop if countrynumber==66 & year==1963;
drop if countrynumber==66 & year==1983;
drop if countrynumber==66 & year==1989;
drop if countrynumber==106 & year==1950;
drop if countrynumber==106 & year==1956;
drop if countrynumber==106 & year==1962;
drop if countrynumber==106 & year==1968;
drop if countrynumber==106 & year==1978;
drop if countrynumber==106 & year==1982;

sum;

*     ****************************************************************  *;
*       There were two elections in Argentina in 1973.  Need to remove  *;
*       one of them.  This leaves 213 elections, 134 runoff, 79         *;
*       plurality, 53 countries.                                        *;
*     ****************************************************************  *;

drop if countrynumber==66& year==1973 &enpres>3;

sum enpres if eighties==1;

sum enpres if nineties==1;

*     ****************************************************************  *;
*       24 countries had presidential elections in the 1980s.           *;
*       59 countries had presidential elections in the 1990s.           *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                   Create variables ready for regressions              *;
*     ****************************************************************  *;

gen eneg_runoff = eneg*pres_runoff;

*     ****************************************************************  *;
*                       Election closest to 1985                        *;
*     ****************************************************************  *;


regress enpres eneg pres_runoff  eneg_runoff if eighties==1, robust;

regress enpres eneg pres_runoff  eneg_runoff if eighties1==1, robust;


matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;

*     ****************************************************************  *;
*           What is the effect of eneg as runoff changes in the 1980s?  *;
*           When runoff is 0, then the effect of eneg is 0.11 (0.12)    *;
*           When runoff is 1, then the effect of eneg is 0.65 (0.31)    *;
*           When runoff is 1, eneg is significant at the 90% level and  *;
*           very close to 95%.                                          *;
*     ****************************************************************  *;


*     ****************************************************************  *;
*                       Election closest to 1980                        *;
*     ****************************************************************  *;


regress enpres eneg pres_runoff  eneg_runoff if eighties_new==1, robust;


matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;


*     ****************************************************************  *;
*           What is the effect of eneg as runoff changes in the 1980s?  *;
*           When runoff is 0, then the effect of eneg is 0.13 (0.10)    *;
*           When runoff is 1, then the effect of eneg is 0.86 (0.38)    *;
*           When runoff is 1, eneg is significant at the 95% level.     *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                  Election closest to 1995                             *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if nineties1==1, robust;

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;


*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.25 (0.12).            *;
*       Effect of eneg in runoff systems is 0.19 (0.09).                *;
*       Thus, eneg is significant at 95% level when runoff=1            *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                  Election closest to 1990                             *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if nineties_lower==1, robust;

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;


*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.23 (0.15).            *;
*       Effect of eneg in runoff systems is 0.29 (0.08).                *;
*       Thus, eneg is significant at 99% level when runoff=1            *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                  Election closest to 2000                             *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if nineties_upper==1, robust;

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;


*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.31 (0.10).            *;
*       Effect of eneg in runoff systems is 0.19 (0.12).                *;
*       Thus, eneg is almost significant at 90% level when runoff=1     *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*     ****************************************************************  *;
*                                   THE END                             *;
*     ****************************************************************  *;
*     ****************************************************************  *;

exit;
